package com.chinasofti;

public class Demo02 {

    public static void main(String[] args) {

        Student stu1 = new Student();
        Student stu2 = new Student(12);

    }

}
class Student{
    {
        //构造代码块
        //每次运行都会格外运行一次
        System.out.println("good good study ,day day up");
    }
    public Student() {
        System.out.println("无参构造器");
    }

    public Student(int a) {
        System.out.println("有参构造器");
    }
}